package edu.isquen.core.jfreechart.action;

import org.jfree.chart.JFreeChart;

import com.opensymphony.xwork2.ActionSupport;

import edu.isquen.core.jfreechart.service.JFreechartService;

public class JFreeCharAction extends ActionSupport {

	private static final long serialVersionUID = 9056841946410878333L;
	
	private JFreeChart chart;

	public JFreeChart getChart() {
		return chart;
	}

	public void setChart(JFreeChart chart) {
		this.chart = chart;
	}

	@Override
	public String execute() throws Exception {
		// 调用方法
		this.chart = JFreechartService.getCategoryChart();
		this.chart = JFreechartService.getPieChart();
		this.chart = JFreechartService.getLineChart();
		return SUCCESS;
	}
}
